<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilasu: xasu_client.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilasu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xasu__client_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xasu_client.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the ASU client initialization and generic queue management functions. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.0   vns  06/03/24 Initial release
      ma   07/17/24 Update P0, P1 Queue addresses and set IsCmdPresent to TRUE before triggering
                    the IPI interrupt to ASU
      ss   08/13/24 Changed XAsu_ClientInit function prototype and Initialized mailbox in
                    <a class="el" href="group__xasu__client__info.html#ga3dc785000c560adedbb23beb0404beee" title="This function initializes the client instance. ">XAsu_ClientInit()</a> API
      ss   09/19/24 Added XAsu_CheckAsufwPrsntBit() API
      yog  09/26/24 Added doxygen groupings and fixed doxygen comments.
      vns  09/30/24 Added support for asynchronous communication
1.1   ma   01/08/25 Clear only ReqBufStatus and RespBufStatus upon command completion
      vns  02/06/25 Fixed magic numbers
      ma   02/19/25 Updated handling of same priority queue requests in round robin scheduling
      am   03/05/25 Added performance measurement init call
      ma   03/14/25 Replace memcpy with Xil_SecureMemCpy to avoid arch dependencies during copy</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae88925a99ed0ab5fac159ee08c4ca25e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gae88925a99ed0ab5fac159ee08c4ca25e">XASU_QUEUE_BUFFER_FULL</a>&#160;&#160;&#160;0xFFU</td></tr>
<tr class="memdesc:gae88925a99ed0ab5fac159ee08c4ca25e"><td class="mdescLeft">&#160;</td><td class="mdescRight">To indicate queue full state.  <a href="group__xasu__client__info.html#gae88925a99ed0ab5fac159ee08c4ca25e">More...</a><br/></td></tr>
<tr class="separator:gae88925a99ed0ab5fac159ee08c4ca25e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0053f2ee702daa610453007e3583faf2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga0053f2ee702daa610453007e3583faf2">XASU_CLIENT_READY</a>&#160;&#160;&#160;0xFFFFFFFFU</td></tr>
<tr class="memdesc:ga0053f2ee702daa610453007e3583faf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">To indicate Client is ready.  <a href="group__xasu__client__info.html#ga0053f2ee702daa610453007e3583faf2">More...</a><br/></td></tr>
<tr class="separator:ga0053f2ee702daa610453007e3583faf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae5635a4c9e53ecd6faf05a752d54aaf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gaae5635a4c9e53ecd6faf05a752d54aaf">XASU_TARGET_IPI_INT_MASK</a>&#160;&#160;&#160;1U</td></tr>
<tr class="memdesc:gaae5635a4c9e53ecd6faf05a752d54aaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">ASU IPI interrupt mask.  <a href="group__xasu__client__info.html#gaae5635a4c9e53ecd6faf05a752d54aaf">More...</a><br/></td></tr>
<tr class="separator:gaae5635a4c9e53ecd6faf05a752d54aaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4c6d3ff41b7e3381a716b46b780d57f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gae4c6d3ff41b7e3381a716b46b780d57f">ASU_GLOBAL_BASEADDR</a>&#160;&#160;&#160;(0xEBF80000U)</td></tr>
<tr class="memdesc:gae4c6d3ff41b7e3381a716b46b780d57f"><td class="mdescLeft">&#160;</td><td class="mdescRight">ASU GLOBAL register base address.  <a href="group__xasu__client__info.html#gae4c6d3ff41b7e3381a716b46b780d57f">More...</a><br/></td></tr>
<tr class="separator:gae4c6d3ff41b7e3381a716b46b780d57f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e520d39b049ebfb42f7ee2d3812a5bc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga1e520d39b049ebfb42f7ee2d3812a5bc">ASU_GLOBAL_GLOBAL_CNTRL</a>&#160;&#160;&#160;(<a class="el" href="group__xasu__client__info.html#gae4c6d3ff41b7e3381a716b46b780d57f">ASU_GLOBAL_BASEADDR</a> + 0x00000000U)</td></tr>
<tr class="memdesc:ga1e520d39b049ebfb42f7ee2d3812a5bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">ASU GLOBAL CNTRL register address.  <a href="group__xasu__client__info.html#ga1e520d39b049ebfb42f7ee2d3812a5bc">More...</a><br/></td></tr>
<tr class="separator:ga1e520d39b049ebfb42f7ee2d3812a5bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad35a1f3313391a14664b3afde8154dee"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gad35a1f3313391a14664b3afde8154dee">ASU_GLOBAL_GLOBAL_CNTRL_FW_IS_PRESENT_MASK</a>&#160;&#160;&#160;0x10U</td></tr>
<tr class="memdesc:gad35a1f3313391a14664b3afde8154dee"><td class="mdescLeft">&#160;</td><td class="mdescRight">ASU FW Present mask value.  <a href="group__xasu__client__info.html#gad35a1f3313391a14664b3afde8154dee">More...</a><br/></td></tr>
<tr class="separator:gad35a1f3313391a14664b3afde8154dee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga07dd2522c0bb1a9f8bfa4ff8c7fe76df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga07dd2522c0bb1a9f8bfa4ff8c7fe76df">XASU_ASUFW_BIT_CHECK_TIMEOUT_VALUE</a>&#160;&#160;&#160;0xFFFFFU</td></tr>
<tr class="memdesc:ga07dd2522c0bb1a9f8bfa4ff8c7fe76df"><td class="mdescLeft">&#160;</td><td class="mdescRight">ASUFW check timoeout value.  <a href="group__xasu__client__info.html#ga07dd2522c0bb1a9f8bfa4ff8c7fe76df">More...</a><br/></td></tr>
<tr class="separator:ga07dd2522c0bb1a9f8bfa4ff8c7fe76df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad71a4202b498e9e086941c197adf96c1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gad71a4202b498e9e086941c197adf96c1">XASU_NO_OF_CONTEXTS</a>&#160;&#160;&#160;(10U)</td></tr>
<tr class="memdesc:gad71a4202b498e9e086941c197adf96c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">No of contexts can be saved by client.  <a href="group__xasu__client__info.html#gad71a4202b498e9e086941c197adf96c1">More...</a><br/></td></tr>
<tr class="separator:gad71a4202b498e9e086941c197adf96c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3dc785000c560adedbb23beb0404beee"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga3dc785000c560adedbb23beb0404beee">XAsu_ClientInit</a> (XMailbox *MailboxInstancePtr)</td></tr>
<tr class="memdesc:ga3dc785000c560adedbb23beb0404beee"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes the client instance.  <a href="group__xasu__client__info.html#ga3dc785000c560adedbb23beb0404beee">More...</a><br/></td></tr>
<tr class="separator:ga3dc785000c560adedbb23beb0404beee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae0f7072bf1eddf7ee11f1e5852570682"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gae0f7072bf1eddf7ee11f1e5852570682">XAsu_ValidateClientParameters</a> (<a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *ClientParamPtr)</td></tr>
<tr class="memdesc:gae0f7072bf1eddf7ee11f1e5852570682"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function validates the input client parameters.  <a href="group__xasu__client__info.html#gae0f7072bf1eddf7ee11f1e5852570682">More...</a><br/></td></tr>
<tr class="separator:gae0f7072bf1eddf7ee11f1e5852570682"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga202195f871d91b50787438e2782be07f"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga202195f871d91b50787438e2782be07f">XAsu_UpdateQueueBufferNSendIpi</a> (<a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *ClientParam, void *ReqBuffer, u32 Size, u32 Header)</td></tr>
<tr class="memdesc:ga202195f871d91b50787438e2782be07f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function updates the queue buffer status to notify the request is present and generates a door bell to ASU.  <a href="group__xasu__client__info.html#ga202195f871d91b50787438e2782be07f">More...</a><br/></td></tr>
<tr class="separator:ga202195f871d91b50787438e2782be07f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6653ca717c2d2ed8399945c294af2f9f"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga6653ca717c2d2ed8399945c294af2f9f">XAsu_RegCallBackNGetUniqueId</a> (const <a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *ClientParamPtr, u8 *RespBufferPtr, u32 Size, u8 IsFinalCall)</td></tr>
<tr class="memdesc:ga6653ca717c2d2ed8399945c294af2f9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function registers callback parameters across the generated unique ID per request.  <a href="group__xasu__client__info.html#ga6653ca717c2d2ed8399945c294af2f9f">More...</a><br/></td></tr>
<tr class="separator:ga6653ca717c2d2ed8399945c294af2f9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga936fc8dfbd6e1c63ea38d52c0a89f55b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga936fc8dfbd6e1c63ea38d52c0a89f55b">XAsu_UpdateCallBackDetails</a> (u8 UniqueId, u8 *RespBufferPtr, u32 Size, u8 IsFinalCall)</td></tr>
<tr class="memdesc:ga936fc8dfbd6e1c63ea38d52c0a89f55b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates callback details based on the provided unique ID, response buffer, size, and final call flag.  <a href="group__xasu__client__info.html#ga936fc8dfbd6e1c63ea38d52c0a89f55b">More...</a><br/></td></tr>
<tr class="separator:ga936fc8dfbd6e1c63ea38d52c0a89f55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97e484d9d293c91c125205c768cdc7d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga97e484d9d293c91c125205c768cdc7d5">XAsu_FreeCtx</a> (void *Context)</td></tr>
<tr class="memdesc:ga97e484d9d293c91c125205c768cdc7d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the memory associated with the provided context.  <a href="group__xasu__client__info.html#ga97e484d9d293c91c125205c768cdc7d5">More...</a><br/></td></tr>
<tr class="separator:ga97e484d9d293c91c125205c768cdc7d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab89446614128abd944047e7c55b1cda2"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#gab89446614128abd944047e7c55b1cda2">XAsu_UpdateNGetCtx</a> (u8 UniqueId)</td></tr>
<tr class="memdesc:gab89446614128abd944047e7c55b1cda2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the provided unique ID and returns the address of the saved context.  <a href="group__xasu__client__info.html#gab89446614128abd944047e7c55b1cda2">More...</a><br/></td></tr>
<tr class="separator:gab89446614128abd944047e7c55b1cda2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga61795a5278b8baf8896d7a81e03c9f6a"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__client__info.html#ga61795a5278b8baf8896d7a81e03c9f6a">XAsu_VerifyNGetUniqueIdCtx</a> (const void *Context, u8 *UniqueId)</td></tr>
<tr class="memdesc:ga61795a5278b8baf8896d7a81e03c9f6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validates the provided context by comparing it with stored contexts to determine the appropriate multi-update calls.  <a href="group__xasu__client__info.html#ga61795a5278b8baf8896d7a81e03c9f6a">More...</a><br/></td></tr>
<tr class="separator:ga61795a5278b8baf8896d7a81e03c9f6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
